﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<SDT.Site.ViewModels.ArticleListViewModel>" %>
<%@ Import Namespace="SDT.Lib.Helpers" %>
<div class="bor_5px" style="height:282px; overflow:hidden"> 	
 	<div class="bar_2box" align="center"><%=ViewData["Title"] %></div>
    <%if (Model.Articles != null && Model.Articles.Count > 0)
      {
          var first = Model.Articles[0]; %>
    <div class=" pad_cnt">
    	<div class="nc_img">
    	    <% string imgPath = (first.ImagePath != null && first.ImagePath != string.Empty) ? SDT.Lib.Common.Utils.GenThumbnail(first.ID, 103, 80, first.ImagePath, Model.ImagePath, Model.RootImageUrl) : SDT.Lib.Common.Globals.DefaultLogo; %>
    	    <img class="bor_img" src="<%=imgPath %>" width="103" height="80" />
    	</div>
		<div class="nc_txt">
          <div><a href="/article/details/<%=first.ID %>/<%=Html.ToUrlFriendly(first.Title)%>"><strong><%=Html.Encode(first.Title)%></strong></a></div>
        </div>
        <div class="clear"></div>
   
      <div class="line_dot"></div>
      <div class="list">
      	<%if (Model.Articles.Count > 1)
            { %>
            <ul>
              <%for(int i=1;i<Model.Articles.Count; i++){
                 %>
                <li><a href="/article/details/<%=Model.Articles[i].ID %>/<%=Html.ToUrlFriendly(Model.Articles[i].Title)%>"><%=Html.Encode(Model.Articles[i].Title)%></a></li>              
               <%} %>
            </ul>
          <%} %>
      </div>
    </div>
    <%} %>
 </div>